<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:76:"D:\phpStudy\WWW\ysyshop\public/../application/admin\view\up_goods\index.html";i:1522844002;s:63:"D:\phpStudy\WWW\ysyshop\application\admin\view\public\base.html";i:1522810551;}*/ ?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>优视雅 后台管理</title>
  <link rel="stylesheet" href="/static/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    

    

  <div class="layui-header">
    <div class="layui-logo">优视雅 后台管理</div>

    <!-- 头部区域（可配合layui已有的水平导航） -->
    <!-- <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item"><a href="">控制台</a></li>
      <li class="layui-nav-item"><a href="">商品管理</a></li>
      <li class="layui-nav-item"><a href="">用户</a></li>
      <li class="layui-nav-item">
        <a href="javascript:;">其它系统</a>
        <dl class="layui-nav-child">
          <dd><a href="">邮件管理</a></dd>
          <dd><a href="">消息管理</a></dd>
          <dd><a href="">授权管理</a></dd>
        </dl>
      </li>
    </ul> -->
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <!-- <img src="http://t.cn/RCzsdCq" class="layui-nav-img"> -->
          <?php echo $userName; ?>
        </a>

          <dl class="layui-nav-child">
              <dd><a onclick="savePasswd()">修改密码</a></dd>
          </dl>

      </li>
      <li class="layui-nav-item"><a href="<?php echo url("Admin/quitLogin"); ?>">退了</a></li>
    </ul>
  </div>
  
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
        <li class="layui-nav-item"><a href='<?php echo url("Index/index"); ?>'>首页</a></li>
        <?php foreach($navList as $v): ?>
          <li class='layui-nav-item <?php if( in_array( $navArr["nav_controller"], $v["controllers"]) ){ echo "layui-nav-itemed"; } ?>'>
            <a class="javascript:;" href="javascript:;"><?php echo $v['name']; ?> <span class="layui-nav-more"></span></a>
            <dl class="layui-nav-child">
                <?php foreach($v['list'] as $vv): ?>
                <dd class='<?php if( $vv["nav_controller"] == $navArr["nav_controller"] && $vv["nav_action"] == $navArr["nav_action"]){  echo "layui-this"; } ?>'>
                    <a href='<?php echo url($vv['url']); ?>'><?php echo $vv['name']; ?></a>
                </dd>
                <?php endforeach; ?>
            </dl>
        </li>
        <?php endforeach; ?>
      </ul>
    </div>
  </div>
  

  <div class="layui-body">
    <!-- 内容主体区域 -->
    
      <div style="padding: 15px 20px;">
            <div class="content">
                <div class="content-top">
                    <p><?php echo $headerName; ?></p>
                </div>
                <div style="padding: 10px;">
                    

<div class="screening">
    <form class="layui-form" action='<?php echo url("UpGoods/index"); ?>' method="get">

        <div class="layui-form-item" style="clear: none;float: left">
            <label class="layui-form-label">订单编号</label>
            <div class="layui-input-inline">
                <input type="text" name="ordernumber"  autocomplete="off" class="layui-input" value="<?php echo !empty($Arr['order_code'])?$Arr['order_code'] : ''; ?>">
            </div>
        </div>
        <div class="layui-form-item" style="clear: none;float: left">
            <label class="layui-form-label">订单状态</label>
            <div class="layui-input-inline">
                <select name="status">
                    <option value="5"  <?php echo $Arr['status']==5?'selected' : ''; ?> >已支付</option>
                    <option value="10" <?php echo $Arr['status']==10?'selected' : ''; ?>>已发货</option>
                    <option value="15" <?php echo $Arr['status']==15?'selected' : ''; ?>>未发货</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item" style="clear: none;float: left">
            <label class="layui-form-label">开始时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" lay-verify="start_time" value="<?php echo !empty($Arr['start_time'])?$Arr['start_time'] : ''; ?>" name="start_time" id="start_time" placeholder="yyyy-MM-dd HH:mm:ss">
            </div>
        </div>
        <div class="layui-form-item" style="clear: none;float: left">
            <label class="layui-form-label">结束时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" name="end_time" value="<?php echo !empty($Arr['end_time'])?$Arr['end_time'] : ''; ?>" id="end_time" placeholder="yyyy-MM-dd HH:mm:ss">
            </div>
        </div>

        <div class="layui-form-item" style="clear: none;float: left">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">确定</button>
            </div>
        </div>
        <div class="clear"></div>
    </form>
</div>


<table class="layui-table">
    <colgroup>
        <col width="60">
        <col width="150">
        <col width="180">
        <col width="250">
        <col width="200">
        <col width="200">
        <col width="200">
        <col width="200">
    </colgroup>
    <thead>
    <tr>
        <th>ID</th>
        <th>用户昵称</th>
        <th>订单编号</th>
        <th>购买商品</th>
        <th>购买数量</th>
        <th>总金额</th>
        <th>时间</th>
        <th>状态</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$li): $mod = ($i % 2 );++$i;?>
    <tr>
        <td><?php echo $li['id']; ?></td>
        <td><?php echo $li['nickname']; ?></td>
        <td><?php echo $li['order_sn']; ?></td>
        <td><?php echo $li['name']; ?></td>
        <td><?php echo $li['num']; ?></td>
        <td><?php echo $li['amount']; ?></td>
        <td><?php echo date("Y-m-d H:i",$li['add_time'] ); ?></td>
        <td>
            <?php if($li['status'] == 0): ?>已删除
            <?php elseif($li['status'] == 5): ?>已支付
            <?php elseif($li['status'] == 10): ?>已发货
            <?php else: ?>已完成
            <?php endif; ?>
        </td>
        <td>
            <div class="layui-table-cell laytable-cell-1-10">
                <?php if($li['status'] == 2): ?>
                <a class="layui-btn layui-btn-danger layui-btn-mini" href='<?php echo url("Up_goods/edit",array("id"=>$li["id"])); ?>' lay-event="edit">待发货</a>
                <?php elseif($li['status'] == 3): ?><span style="disabled:disabled"></span>
                <a class="layui-btn layui-btn-primary layui-btn-mini" href='#'  lay-event="edit">待收货</a>
                <?php elseif($li['status'] == 1): ?><span style="disabled:disabled"></span>
                <a class="layui-btn layui-btn-primary layui-btn-mini" href='#'  lay-event="edit">未确认</a>
                <?php endif; ?>
                <a class="layui-btn layui-btn-mini" href='<?php echo url("Up_goods/detail",array("id"=>$li["id"])); ?>'  lay-event="edit">详情</a>
                <!--<a class="layui-btn layui-btn-danger layui-btn-mini" onclick="saveStatus(<?php echo $li['id']; ?>,<?php echo $li['status']; ?>)"><?php echo $li['status']==10?'下线': '上线'; ?></a>-->
            </div>
        </td>
    </tr>
    <?php endforeach; endif; else: echo "" ;endif; ?>
    </tbody>

</table>

<?php echo $page; ?>

                </div>
            </div>
        </div>
    
  </div>
  
  <div class="layui-footer">
    <!-- 底部固定区域 -->
    © www.yosiya.net - 优视雅集团有限公司
  </div>
</div>

<script src="/static/common/js/jquery-3.2.1.min.js" charset="utf-8"></script>
<script src="/static/layer/layer.js" charset="utf-8"></script>
<script src="/static/layui/layui.js"  charset="utf-8"></script>
<script src="/static/admin/js/common.js" charset="utf-8"></script>
<script>
    window.global = {
        pageType: 'demo'
        ,preview: function(){
            var preview = document.getElementById('LAY_preview');
            return preview ? preview.innerHTML : '';
        }()
    };
    var web_width = window.innerWidth;
    if( web_width <= 1200 ){
        layui.config({
            base: '/static/layui/'
        }).use('global');
    }

    function savePasswd(){
        layui.use('layer', function(){
            var layer = layui.layer;

            layer.open({
                title:"修改密码",
                type: 2,
                area: ['500px', '400px'],
                content: ['<?php echo url("Admin/savePasswd"); ?>', 'no'],
                end: function () {
                    location.reload();
                }
            });
        });
    }
</script>

<div id="LAY_democodejs">
    <script>
        layui.use('element', function(){
            var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

            //监听导航点击
            element.on('nav(demo)', function(elem){
                //console.log(elem)
                layer.msg(elem.text());
            });
        });
    </script>
</div>


<script src="/static/common/js/fromCommon.js" charset="utf-8"></script>
<script type="text/javascript">

    layui.use('table', function(){
        var table = layui.table;
        //监听工具条
        table.on('tool(test)', function(obj){ //注：tool是工具条事件名，test是table原始容器的属性 lay-filter="对应的值"
            var data = obj.data; //获得当前行数据
            var layEvent = obj.event; //获得 lay-event 对应的值
            var tr = obj.tr; //获得当前行 tr 的DOM对象

        });
    });

    layui.use('form', function(){
        var form = layui.form;
        form.verify({
            start_time: function(value){
                var  end_time = $("#end_time").val();
                if( end_time != ""){
                    if( value == "" ){
                        return '请选择开始时间';
                    }
                }
            }
        });
    });

    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //时间选择器
        laydate.render({
            elem: '#start_time'
            ,type: 'datetime'
            ,trigger: 'click'
        });
        laydate.render({
            elem: '#end_time'
            ,type: 'datetime'
            ,trigger: 'click'
        });
    });
</script>


</body>
</html>